<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="三包未出库明细" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color" ng-if="!!btnPermission.sapErrorExport">
                            <div title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <!-- <li yb-download download-url="exportParam.sectionUrl" download-param="exportParam.sectionParam"
                                    download-key="ids">
                                    <i class="yb-icon ico-export-o"></i> 导出
                                </li> -->
                                <li yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3">
                                    <i class="yb-icon ico-export-o"></i> 导出全部
                                </li>
                            </ul>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="三包出库单号"
                               ng-model="condition.threeOutNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
                <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                    <div class="advance-search m-t-sm">
                        <div class="form-group clearfix">
                            <label class="control-label">三包出库单号：</label>
                            <input type="text" name="threeOutNo" ng-model="condition.threeOutNo" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">服务信息单号：</label>
                            <input type="text" name="serviceNo" ng-model="condition.serviceNo" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">CRM单据号：</label>
                            <input type="text" name="crmOrder" ng-model="condition.crmOrder" class="form-control">
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label">零件编号</label>
                            <input type="text" name="materialsNo" ng-model="condition.materialsNo" class="form-control">
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label">制单时间：</label>
                            <input type="text" class="form-control date-picker" ng-model="condition.createStartDate"
                                   datepicker-popup="{{'yyyy-MM-dd'}}"
                                   ng-click="showDatepickerBegin = !showDatepickerBegin"
                                   ng-change="checkDate(condition, 'createStartDate', 'createEndDate')"
                                   is-open="showDatepickerBegin" close-text="关闭" modal-size="small" readonly>
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label"></label>
                            <label class="control-label wave-line">~</label>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label"></label>
                            <input type="text" class="form-control date-picker" ng-model="condition.createEndDate"
                                   datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showDatepickerEnd = !showDatepickerEnd"
                                   ng-change="checkDate(condition, 'createStartDate', 'createEndDate')"
                                   is-open="showDatepickerEnd" close-text="关闭" modal-size="small" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="false"
                 has-check-col="true"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="text-center th-check border-l-none">
                                    <div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll(dataList)"></div>
                                </th>
                                <th width="100">操作</th>                                
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-click="toSort(tbConf.tableCol, $index)"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"
                                ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
                                <td width="40" class="text-center border-l-none">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, dataList)"></div>
                                </td>
                                <td width="100" class="font-0">
                                    <button class="btn btn-operate m-r-xs" ng-click="editData(item)">编辑</button>
                                </td>
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选"
                     yb-click="selectAll(dataList)"></div>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="编辑" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="main-area d-t-35 d-b-60">
                <form name="form" class="main-wrap form-horizontal single-col p-t clearfix" novalidate>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">影响客户使用需加急：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="remark1" class="form-control" ng-model="detailInfo.remark1"
                                    yb-focus maxlength="200">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-2 control-label">备注：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="remark2" class="form-control" ng-model="detailInfo.remark2"
                                   maxlength="200">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-2 control-label">送货时间：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" class="form-control date-picker" ng-model="detailInfo.sendDate"
                                   datepicker-popup="{{'yyyy-MM-dd'}}"
                                   ng-click="showDatepickersendDate = !showDatepickersendDate"
                                   is-open="showDatepickersendDate" close-text="关闭" modal-size="small" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label">备件责任人：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="resPerson" class="form-control" ng-model="detailInfo.resPerson"
                                >
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-xs-2 control-label">采购员：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="purchasePerson" class="form-control" ng-model="detailInfo.purchasePerson"
                                >
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-2 control-label">供货商：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="supplierName" class="form-control" ng-model="detailInfo.supplierName"
                                >
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-2 control-label">实际到货时间：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" class="form-control date-picker" ng-model="detailInfo.realSendDate"
                                   datepicker-popup="{{'yyyy-MM-dd'}}"
                                   ng-click="showDatepickerrealSendDate = !showDatepickerrealSendDate"
                                   is-open="showDatepickerrealSendDate" close-text="关闭" modal-size="small" readonly>
                        </div>
                    </div>
                    <div class="form-group save-bar m-b-none">
                        <label class="col-xs-2 control-label"></label>
                        <div class="col-xs-5 wrapper-none">
                            <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid)">
                                保存
                            </button>
                            <button type="button" class="btn btn-default" ng-click="changeTab(0)">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>